import React, { useEffect } from 'react'
import {useNavigate} from 'react-router-dom'
import style from './index.module.css'
import { setDefaultConfig } from 'antd-mobile'
const Index:React.FC = () => {
  const navigate=useNavigate()
  const yyzd = () => {
    // 用药指导
    navigate("/medicationguidance")
  }
  const yhsm = () => {
    //  医护上门
     navigate("/medicalDoorstep")
  }
  const jkqy = () => {
    //  健康权益
     navigate("/healthrights")
   }
  const jszx = () => {
    // 极速咨询
    navigate("/quickconsultation")
  }
  const tyyy=()=>{ 
    // 体验预约
    navigate("/experiencereservation")
  }
  let address=localStorage.getItem("city")
  useEffect(()=>{
    // console.log("地址改变了")
  },[address])
  return (
    <div>
       <div className={style.tu}>
            <div onClick={yyzd}>
                <img src="../src/assets/yyzd.png" alt="" style={{height:'50px'}}/>
                <p className={style.yao}>用药指导</p>
            </div>
             <div onClick={yhsm}>
                <img src="../src/assets/yhsm.png" alt="" style={{height:'50px'}}/>
                <p className={style.yao}>医护上门</p>
            </div>
             <div onClick={jkqy}>
                <img src="../src/assets/jkqy.png" alt="" style={{height:'50px'}}/>
                <p className={style.yao}>健康权益</p>
            </div>
             <div onClick={jszx}>
                <img src="../src/assets/jszx.png" alt="" style={{height:'50px'}}/>
                <p className={style.yao}>极速咨询</p>
            </div>
             <div onClick={tyyy}>
                <img src="../src/assets/tyyy.png" alt="" style={{height:'50px'}}/>
                <p className={style.yao}>体验预约</p>
            </div>
        </div>
    </div>
  )
}

export default Index
